home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Forever 4
/
Atari Forever 4.zip
/
Atari Forever 4.iso
/
PD_THEMA
/
EDITOREN
/
7UP_PD
/
3D.TXT
next >
Wrap
Text File
|
1998-03-14
|
7KB
|
171 lines
=================================================================
Three Dimensional Objects 1/21/93
Three dimensional objects are implemented in AES version 3.4 and
up.
Defines:
#define FL3DMASK 0x0600
#define FL3DNONE 0x0000
#define FL3DIND 0x0200
#define FL3DBAK 0x0400
#define FL3DACT 0x0600
#define LK3DIND
#define LK3DACT
#define INDBUTCOL
#define ACTBUTCOL
#define BACKGRCOL
#define AD3DVALUE
Description:
The AES uses 2 new bits in the ob_flags field of objects to
indicate what kind of 3D shading effects (if any) should be used
on the object. These are bits 9 and 10 of ob_flags.
If both bits are clear (FL3DNONE) then no 3D shading effects are
applied to the object.
If (ob_flags & FL3DMASK) is FL3DIND, then the object is an
"indicator." Typically indicators are used in dialog boxes to
indicate some sort of state; for example, whether an option is
"on" or "off." Radio buttons should always be indicators.
If (ob_flags & FL3DMASK) is FL3DACT, then the object is an
"activator." Activators don't have a persistent state, but
rather are usually controls of some sort. For example, the "OK"
and "Cancel" buttons in dialog boxes should be activators.
If (ob_flags & FL3DMASK) is FL3DBAK, then the object is a
"background" object. Background objects are usually not
selectable, and do not typically display 3D effects other than
inheriting the "3D background object" color (see below); the
only 3D effect applied to background objects is that "outlined"
background objects appear to be raised above the objects behind
them.
The colors (and effects, for indicators and activators) of 3D
objects may be controlled by the objc_sysvar function. Any 3D
object which is color 0 (white) and has a hollow fill pattern
will be drawn in the 3D default color set for its object type,
instead of in white. 3D objects which are not white or which
have a non-hollow fill pattern will be drawn in the color and
pattern specified, as usual.
-----------------------------------------------------------------
6.4.9 OBJC_SYSVAR
Purpose:
Allows an application to set or inquire the colors and effects
for 3D objects. Applications should not change 3D colors or
effects except at the explicit request of the user, because all
such changes are global (i.e. they affect all processes).
Parameters:
control(0) = 48
control(1) = 4
control(2) = 3
control(3) = 0
control(4) = 0
int_in(0) = ob_smode
int_in(1) = ob_swhich
int_in(2) = ob_sival1
int_in(3) = ob_sival2
int_out(0) = ob_sreturn
int_out(1) = ob_soval1
int_out(2) = ob_soval2
o ob_smode - whether the call is to get or set attributes
0 Inquire (get) attributes
1 Set attributes
o ob_swhich - which attributes are being set or inquired; this
also affects the meaning of the other values,
as follows:
LK3DIND
Get/set attributes for indicator objects. If
ob_smode is 0, then ob_soval1 indicates whether
the text of indicator objects does(1) or does not
(0) move when the object is selected, and
ob_soval2 indicates whether the object does (1)
or does not (0) change color when selected. If
ob_smode is 1, then ob_sival1 controls whether
indicator object text will (1) or will not (0)
move when the object is selected, and ob_sival2
controls whether indicator objects will (1) or
will not (0) change color when sel ected. The
default is ob_sival1 = 1 and ob_sival2 = 0.
LK3DACT
Get/set attributes for activator objects. The mean
ings of ob_soval1, ob_soval2, ob_sival1, and
ob_sival2 are the same as for LK3DIND, except
that they apply to activator objects rather than
indicator objects. The defaults for activator
objects is ob_sival1 = 0 and ob_sival1 = 1.
INDBUTCOL
Get/set default color for indicator objects. This
is the color which hollow, white indicator
objects (e.g. buttons) will be drawn in instead
of white. If ob_smode is 0, then ob_soval1 is
the current color index of the default indicator
object color. If ob_smode is 1, then ob_sival1
is the new color index for indicator objects.
ACTBUTCOL
Get/set default color for activator objects. Same
as INDBUTCOL, but applies to activators rather
than indicators.
BACKGRCOL
Get/set default color for 3D background objects.
Same as INDBUTCOL, but applies only to 3D
background objects.
AD3DVALUE
Get pixel adjustments for 3D indicators and activa
tors. ob_smode must be 0. ob_soval1 is set to
the number of pixels by which 3D indicators and
activators are expanded on each side
horizontally (to accomodate 3D effects), and
ob_soval2 is the number of pixels by which they
are expanded vertically. Remember that this
adjustment is applied to each side of the
object, so the objects width or height is
increased by twice this amount. Background 3D
objects never change in size.
o ob_sreturn - a coded return message
0 - FAILURE: an illegal value has been given for ob_swhich
or for ob_smode
>0 - SUCCESS: the objc_sysvar call succeeded
------------------------------------------------
Sample call to C language binding:
ob_return = objc_sysvar( word ob_smode,
word ob_swhich,
word ob_sival1,
word ob_soval1,
word *ob_soval1,
word *ob_soval2 );